/**
* 子模块路由
* ml
*/

var router = function ($urlRouterProvider, $stateProvider) {

	$stateProvider

		//平台首页
		.state('app.tourIndex', {
			url: "/tour/index",
			views: {
				'main@': {
					template: require('./views/tourIndex.html'),
					controller: 'tourIndex'
				}
			},
			resolve: {

			}
		})

		//内部首页
		.state('app.tourIndexInside', {
			url: "/tour/indexInside",
			views: {
				'main@': {
					template: require('./views/tourIndexInside.html'),
					controller: 'tourIndexInside'
				}
			},
			resolve: {

			}
		})

		//公告展示
		.state('app.noticeInfo', {
			url: "/notice/info",
			views: {
				'main@': {
					template: require('./views/noticeInfo.html'),
					controller: 'noticeInfo'
				}
			},
			resolve: {

			}
		})

		//平台公告管理列表
		.state('app.noticeList', {
			url: "/volNotice/list",
			views: {
				'main@': {
					template: require('./views/noticeList.html'),
					controller: 'noticeList'
				}
			},
			resolve: {

			}
		})

		//内部公告管理列表
		.state('app.noticeListInside', {
			url: "/volNoticeInside/list",
			views: {
				'main@': {
					template: require('./views/noticeListInside.html'),
					controller: 'noticeListInside'
				}
			},
			resolve: {

			}
		})

		//公告编辑
		.state('app.noticeEdit', {
			url: "/volNotice/edit/:type",
			views: {
				'main@': {
					template: require('./views/noticeEdit.html'),
					controller: 'noticeEdit'
				}
			},
			resolve: {

			}
		})


		//公益游分配
		.state('app.setSaleAllot', {
			url: "/sale/allot",
			views: {
				'main@': {
					template: require('./views/setSaleAllot.html'),
					controller: 'setSaleAllot'
				}
			},
			resolve: {
				getDate: function (utilservice) {
                    return utilservice.getDate;
				},
			}
		})

		//部门名额分配
		.state('app.apartSaleSet', {
			url: "/part/allot",
			views: {
				'main@': {
					template: require('./views/apartSaleSet.html'),
					controller: 'apartSaleSet'
				}
			},
			resolve: {
				getDate: function (utilservice) {
                    return utilservice.getDate;
				},
			}
		})

		//活动列表
		.state('app.tourActivityList', {
			url: "/tourActivity/list",
			views: {
				'main@': {
					template: require('./views/tourActivityList.html'),
					controller: 'tourActivityList'
				}
			},
			resolve: {

			}
		})

		//活动编辑/活动创建
		.state('app.tourActivityEdit', {
			url: "/tourActivity/edit/:type/:id",
			views: {
				'main@': {
					template: require('./views/tourActivityEdit.html'),
					controller: 'tourActivityEdit'
				}
			},
			resolve: {

			}
		})

		//车辆列表
		.state('app.tourBusList', {
			url: "/tourBus/list/:type",
			views: {
				'main@': {
					template: require('./views/tourBusList.html'),
					controller: 'tourBusList'
				}
			},
			resolve: {

			}
		})

		//活动销售列表
		.state('app.tourSaleList', {
			url: "/tourSalelist",
			views: {
				'main@': {
					template: require('./views/tourSaleList.html'),
					controller: 'tourSaleList'
				}
			},
			resolve: {

			}
		})

		//订单列表
		.state('app.volOrderList', {
			url: "/volorder/list/:type",
			views: {
				'main@': {
					template: require('./views/volOrderList.html'),
					controller: 'volOrderList'
				}
			},
			resolve: {
				getDate: function (utilservice) {
                    return utilservice.getDate;
				}
			}
		})

		//订单统计
		.state('app.orderAccountList', {
			url: "/volorder/account",
			views: {
				'main@': {
					template: require('./views/orderAccountList.html'),
					controller: 'orderAccountList'
				}
			},
			resolve: {
				getDate: function (utilservice) {
                    return utilservice.getDate;
				}
			}
		})

		//分配账号
		.state('app.volCompanyInfo', {
			url: "/volcompany/info/:code",
			views: {
				'main@': {
					template: require('./views/officeinfo.html'),
					controller: 'officeinfo'
				}
			},
			resolve: {
				getDate: function (utilservice) {
                    return utilservice.getDate;
				}
			}
		})

};

module.exports = router;